package com.liumuxian.base.controller;

import com.liumuxian.base.pojo.IntegralData;
import com.liumuxian.base.service.IntegralDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/integralData")
public class IntegralDataContrtoller {
    @Autowired
    IntegralDataService integralDataService;

    @RequestMapping("/save")
    public String save(IntegralData integralData){
        integralDataService.save(integralData);
        return null;
    }

    @RequestMapping("/updatetopage")
    public String updatetopage(String id){
        IntegralData integralData=integralDataService.updatetopage(id);
        return null;
    }

    @RequestMapping("/updates")
    public String updates(IntegralData integralData){
        integralDataService.updates(integralData);
        return null;
    }

    @RequestMapping("/findAll")
    public Page<IntegralData> findAll(Integer pagesize,Integer pagenumber,IntegralData integralData) throws Exception {
        return integralDataService.findAll(pagesize,pagenumber,integralData);
    }

    @RequestMapping("/deletes")
    public String deletes(String id){
        integralDataService.deletes(id);
        return null;
    }

}
